package com.learning.threading.producer.consumer.blocking.queue;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// Creating shared object
		BlockingQueue<String> sharedQueue = new LinkedBlockingQueue<String>(1);

		// Creating Producer and Consumer Thread
		Thread prodThread = new Thread(new Producer(sharedQueue));
		Thread consThread = new Thread(new Consumer(sharedQueue));

		// Starting producer and Consumer thread
		prodThread.start();
		consThread.start();
	}

}
